import {NgModule} from '@angular/core';
import {Routes, RouterModule} from '@angular/router';
import {DecimalComponent} from './decimal/decimal.component';
import {IntegerComponent} from './integer/integer.component';
import {TrimComponent} from './trim/trim.component';
import {ByteLengthComponent} from './byte-length/byte-length.component';
import {StringComponent} from './string/string.component';
import {FormComponent} from './form/form.component';
import {CanDeactivateGuard} from 'great-ngform';
import {CanLeaveComponent} from './can-leave/can-leave.component';


const routes: Routes = [
  {path: 'decimal', component: DecimalComponent},
  {path: 'integer', component: IntegerComponent},
  {path: 'trim', component: TrimComponent},
  {path: 'byte-length', component: ByteLengthComponent},
  {path: 'string', component: StringComponent},
  {path: 'form', component: FormComponent, canDeactivate: [CanDeactivateGuard]},
  {path: 'can-leave', component: CanLeaveComponent, canDeactivate: [CanDeactivateGuard]}
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class FormRoutingModule {
}
